﻿using System;
using NHunspell;
using System.Collections.Generic;
using ku.datamodel.contract;

namespace CSharpConsoleSamples
{
    class Program
    {
        static void Main(string[] args)
        {

            string input;

            Console.Write("Geben Sie ein deutsches Wort ein und bestätigen Sie mit Enter: \n");
            input = Console.ReadLine();

            // Important: Due to the fact Hyphen will use unmanaged memory you have to serve the IDisposable pattern
            // In this block of code this is be done by a using block. But you can also call hyphen.Dispose()
            using (Hyphen hyphen = new Hyphen(@"hyph_de_DE.dic"))
            {
                HyphenResult hyphenated = hyphen.Hyphenate(input);
                Console.WriteLine(String.Format("{0} is hyphenated as: \n{1}", input, hyphenated.HyphenatedWord));

            }


            Console.WriteLine("");
            Console.WriteLine("Press any key to continue...");
            Console.ReadKey();


        }

    }
}

